package cn.com.taiji.pos.entity;

import cn.com.taiji.entity.StringUUIDEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 账户交易储值流水
 * </p>
 *
 * @author
 * @since 2021-03-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TradeAccountStoreFlow extends StringUUIDEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * POS机
     */
    @TableField("POS_MACHINE_ID")
    private String posMachineId;

    /**
     * 所属顾客
     */
    @TableField("CUSTOMER_ID")
    private String customerId;

    /**
     * 所属账户
     */
    @TableField("ACCOUNT_ID")
    private String accountId;

    /**
     * 冲卡卡号
     */
    @TableField("CARD_ID")
    private String cardId;

    /**
     * 操作类型(0:储值 1:储值冲账 2:退款(或卡)
     */
    @TableField("OPERATE_TYPE")
    private Integer operateType;

    /**
     * 结算类型
     */
    @TableField("SETTLEMENT_TYPE_ID")
    private String settlementTypeId;

    /**
     * 流水单号
     */
    @TableField("FLOW_NO")
    private String flowNo;

    /**
     * 操作前金额
     */
    @TableField("BEFORE_AMOUNT")
    private BigDecimal beforeAmount;

    /**
     * 操作(增减)金额
     */
    @TableField("ACTUAL_AMOUNT")
    private BigDecimal actualAmount;

    /**
     * 操作后金额
     */
    @TableField("AFTER_AMOUNT")
    private BigDecimal afterAmount;

    /**
     * 操作前次数
     */
    @TableField("BEFORE_TIMES")
    private Integer beforeTimes;

    /**
     * 操作(增减)次数
     */
    @TableField("TIMES")
    private Integer times;

    /**
     * 操作后次数
     */
    @TableField("AFTER_TIMES")
    private Integer afterTimes;

    /**
     * 操作原因(冲账用)
     */
    @TableField("REASON_ID")
    private String reasonId;

    /**
     * 是否开具发票(0:否1:是)
     */
    @TableField("IS_PAY")
    private String isPay;

    /**
     * 创建人(操作人)
     */
    @TableField("CREATOR_ID")
    private String creatorId;

    /**
     * 创建人姓名
     */
    @TableField("CREATOR_NAME")
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField("CREATE_TIME")
    private LocalDateTime createTime;

    /**
     * 是否导出xml(0:否1:是)
     */
    @TableField("XML_OUT")
    private String xmlOut;

    @TableField("BUSINESS_TYPE_ID")
    private String businessTypeId;

    @TableField("RETURN_PLEDGE")
    private BigDecimal returnPledge;

    @TableField("WECHATCODE")
    private String wechatcode;


}
